<script setup>
import { onBeforeRouteUpdate, onBeforeRouteLeave } from 'vue-router/composables'

onBeforeRouteUpdate(() => {
  console.log('beforeRouteUpdate');
})

onBeforeRouteLeave((to, from, next) => {
  console.log('onBeforeRouteLeave');
  next()
})
</script>

<template>
  <main>
    首页
  </main>
</template>
